<style scoped >
    /*新增，编辑表单*/
    .center{
        color: #7a7677;
        font-size: 14px;
    }
    .ivu-btn-small:last-child{
        padding: 6px 23px;
        font-size: 12px;
        border-radius: 3px;
        color: #fff;
        background: #c7cdcd;
        border:0;

    }
    .ivu-btn-small:last-child:hover {
        padding: 6px 23px;
        font-size: 12px;
        border-radius: 3px;
        background: #c7cdcd;
        color: #fff;
        border:0;
    }
    .ivu-btn-small:first-child{
        padding: 6px 23px;
        font-size: 12px;
        border-radius: 3px;
        color: #fff;
        background: #2db3b4;
        border:0;
    }
    .ivu-btn-small:first-child:hover {
        padding: 6px 23px;
        font-size: 12px;
        border-radius: 3px;
        background: #2db3b4;
        color: #fff;
        border:0;
    }
    .ivu-btn-small:first-child:hover{background: #019ea3;}
    .ivu-input-wrapper {  width: 90%;  }
    .fr i{margin-right: 3px;}
    h4{
        font-size: 15px;
        padding: 0 16px;
        color: #36b4b3;
        line-height: 40px;
        border: 1px solid #e5eaee;
        border-right:0;margin-bottom: 8px;
        background: -webkit-gradient(linear, 0 0, 0 100%, from(#fbfbfb), to(#f5f5f5));
    }
    .basicInfor{
        padding:0 16px;
    }
    .TrouParts,.topPart{
        padding:0 17px;
    }
    .title{
        padding-left: 15%;
    }
    .noteInfor .ivu-input-wrapper{
        padding:16px;width:100%;
    }
    .order{
        width:90%;
    }
    .gylx .ivu-form-item-content .ivu-radio-group .ivu-radio-wrapper{margin-right: 3px;}
</style>
<template>
    <div class="console-product">
        <!-- 头部-->
        <Row class="position">
            <i-col :xs="12" :sm="10" :md="8" :lg="6" >
                <div class="ivu-breadcrumb">
                    <span class="ivu-breadcrumb-item-link">当前位置：</span>
                    <span class="ivu-breadcrumb-item-link">
                        业务中心
                    </span>
                    <span class="ivu-breadcrumb-item-separator">/</span>
                    <span class="ivu-breadcrumb-item-link">试衣反馈</span>
                </div>
            </i-col>
            <i-col class="fr">
                <Button @click="addSyfk"><i class="iconfont" style="color:#f76165;">&#xe615;</i>回执登记</Button>
                <Modal class-name="popup" class="syfkBody" v-model="syfkModal" width="650" @on-cancel="clearPicOrder('syfkValidate')" :mask-closable="false" >
                    <p slot="header" v-drag>
                        <span style="color:#fff" v-if="addCus">反馈登记</span>
                        <span style="color:#fff" v-if="editorCus">反馈查看</span>
                    </p>
                    <div class="center">
                        <Form  ref="syfkValidate" :model="syfkValidate" :rules="rulesyfk"  label-position="left">
                            <div class="syfkList">
                                <h4>
                                    基本信息
                                </h4>
                                <div class="basicInfor">
                                    <Row>
                                        <input type="hidden" name="id" v-model="syfkValidate.id">
                                        <i-col span="10">
                                            <Form-item class="gylx" label="改衣类型:" prop="clothingtype">
                                                <Radio-group v-model="syfkValidate.clothingtype" style="margin-left: 33px;">
                                                    <Radio :disabled="disabled" label=1>半成品试衣</Radio>
                                                    <Radio :disabled="disabled" label=2>成品改衣</Radio>
                                                </Radio-group>
                                            </Form-item>
                                        </i-col>
                                        <i-col span="12">
                                            <Form-item prop="business">
                                                <Radio-group v-model="syfkValidate.business">
                                                    (
                                                        <Radio :disabled="disabled" label="mtm">量体定制</Radio>
                                                        <Radio :disabled="disabled" label="tz">团装</Radio>
                                                        <Radio :disabled="disabled" label="ls">零售</Radio>
                                                    )
                                                </Radio-group>
                                            </Form-item>
                                        </i-col>
                                    </Row>
                                    <Row>
                                        <i-col span="11">
                                            <Form-item label="店名/单位:" prop="unit" :label-width="90">
                                                <Input :disabled="disabled" v-model="syfkValidate.unit" placeholder=""></Input>
                                            </Form-item>
                                         </i-col>
                                        <i-col span="11" offset="2">
                                            <Form-item label="订单号:" prop="orderno" :label-width="90">
                                                <Select class="order" v-if="addCus" @on-change="changeOrder" v-model="syfkValidate.orderno" placeholder="" clearable filterable remote :remote-method="remoteOrderno" :loading="loadingOrderno">
                                                    <Option v-for="item in autoList" :value="item.khdh" :key="item">{{ item.khdh }}</Option>
                                                </Select>
                                                <Input v-if="editorCus" :disabled="disabled" v-model="syfkValidate.orderno" placeholder=""></Input>
                                            </Form-item>
                                        </i-col>
                                    </Row>
                                    <Row>
                                        <i-col span="11">
                                            <Form-item label="顾客姓名:" prop="name" :label-width="90">
                                                <Input :disabled="disabled" v-model="syfkValidate.name" placeholder=""></Input>
                                            </Form-item>
                                        </i-col>
                                        <i-col span="11" offset="2">
                                            <Form-item label="量体师:" prop="massingname" :label-width="90">
                                                <Input :disabled="disabled" v-model="syfkValidate.massingname" placeholder=""></Input>
                                            </Form-item>
                                        </i-col>
                                    </Row>
                                    <Row>
                                        <i-col span="11">
                                            <Form-item label="电话:" prop="phone" :label-width="90">
                                                <Input :disabled="disabled" v-model="syfkValidate.phone" placeholder=""></Input>
                                            </Form-item>
                                        </i-col>
                                        <i-col span="11" offset="2">
                                            <Form-item label="填表日期:" prop="createtime" :label-width="90">
                                                <Input :disabled="true" v-model="syfkValidate.createtime" placeholder=""></Input>
                                            </Form-item>
                                        </i-col>
                                    </Row>
                                </div>
                                <h4>
                                    上衣部位信息(厘米)
                                </h4>
                                <div class="topPart">
                                    <Row class="title">
                                        <i-col span="6">测量尺寸</i-col>
                                        <i-col span="6">加减值</i-col>
                                    </Row>
                                    <Row>
                                        <i-col span="14">
                                            <Row>
                                                <i-col span="11">
                                                    <Form-item label="衣长:" prop="yc" :label-width="40">
                                                        <Input :disabled="disabled" v-model="syfkValidate.yc" style="margin-left: 23px;"></Input>
                                                    </Form-item>
                                                </i-col>
                                                <i-col span="2" style="text-align: center">→</i-col>
                                                <i-col span="11">
                                                    <Form-item prop="ycjj">
                                                        <Input :disabled="disabled" v-model="syfkValidate.ycjj"></Input>
                                                    </Form-item>
                                                </i-col>
                                            </Row>
                                            <Row>
                                                <i-col span="11">
                                                    <Form-item label="肩宽:" prop="jk" :label-width="40">
                                                        <Input :disabled="disabled" v-model="syfkValidate.jk" style="margin-left: 23px;"></Input>
                                                    </Form-item>
                                                </i-col>
                                                <i-col span="2" style="text-align: center">→</i-col>
                                                <i-col span="11">
                                                    <Form-item prop="jkjj">
                                                        <Input :disabled="disabled" v-model="syfkValidate.jkjj"></Input>
                                                    </Form-item>
                                                </i-col>
                                            </Row>
                                            <Row>
                                                <i-col span="11">
                                                    <Form-item label="袖长:" prop="xc" :label-width="40">
                                                        <Input :disabled="disabled" v-model="syfkValidate.xc" style="margin-left: 23px;"></Input>
                                                    </Form-item>
                                                </i-col>
                                                <i-col span="2" style="text-align: center">→</i-col>
                                                <i-col span="11">
                                                    <Form-item prop="xcjj">
                                                        <Input :disabled="disabled" v-model="syfkValidate.xcjj"></Input>
                                                    </Form-item>
                                                </i-col>
                                            </Row>
                                            <Row>
                                                <i-col span="11">
                                                    <Form-item label="胸围:" prop="xw" :label-width="40">
                                                        <Input :disabled="disabled" v-model="syfkValidate.xw" style="margin-left: 23px;"></Input>
                                                    </Form-item>
                                                </i-col>
                                                <i-col span="2" style="text-align: center">→</i-col>
                                                <i-col span="11">
                                                    <Form-item prop="xwjj">
                                                        <Input :disabled="disabled" v-model="syfkValidate.xwjj"></Input>
                                                    </Form-item>
                                                </i-col>
                                            </Row>
                                            <Row>
                                                <i-col span="11">
                                                    <Form-item label="腹围:" prop="fw" :label-width="40">
                                                        <Input :disabled="disabled" v-model="syfkValidate.fw" style="margin-left: 23px;"></Input>
                                                    </Form-item>
                                                </i-col>
                                                <i-col span="2" style="text-align: center">→</i-col>
                                                <i-col span="11">
                                                    <Form-item prop="fwjj">
                                                        <Input :disabled="disabled" v-model="syfkValidate.fwjj"></Input>
                                                    </Form-item>
                                                </i-col>
                                            </Row>
                                            <Row>
                                                <i-col span="11">
                                                    <Form-item label="臀围:" prop="tw" :label-width="40">
                                                        <Input :disabled="disabled" v-model="syfkValidate.tw" style="margin-left: 23px;"></Input>
                                                    </Form-item>
                                                </i-col>
                                                <i-col span="2" style="text-align: center">→</i-col>
                                                <i-col span="11">
                                                    <Form-item prop="twjj">
                                                        <Input :disabled="disabled" v-model="syfkValidate.twjj"></Input>
                                                    </Form-item>
                                                </i-col>
                                            </Row>
                                        </i-col>
                                        <i-col span="10">
                                            <img src="../../images/syfkxifu.png" style="width: 250px;">
                                        </i-col>
                                    </Row>
                                </div>
                                <h4>
                                    西裤部位信息(厘米)
                                </h4>
                                <div class="TrouParts">
                                    <Row class="title">
                                        <i-col span="6">测量尺寸</i-col>
                                        <i-col span="6">加减值</i-col>
                                    </Row>
                                    <Row>
                                        <i-col span="14">
                                            <Row>
                                                <i-col span="11">
                                                    <Form-item label="立档:" prop="ld" :label-width="40">
                                                        <Input :disabled="disabled" v-model="syfkValidate.ld" style="margin-left: 23px;"></Input>
                                                    </Form-item>
                                                </i-col>
                                                <i-col span="2" style="text-align: center">→</i-col>
                                                <i-col span="11">
                                                    <Form-item prop="ldjj">
                                                        <Input :disabled="disabled" v-model="syfkValidate.ldjj"></Input>
                                                    </Form-item>
                                                </i-col>
                                            </Row>
                                            <Row>
                                                <i-col span="11">
                                                    <Form-item label="腰围:" prop="yw" :label-width="40">
                                                        <Input :disabled="disabled" v-model="syfkValidate.yw" style="margin-left: 23px;"></Input>
                                                    </Form-item>
                                                </i-col>
                                                <i-col span="2" style="text-align: center">→</i-col>
                                                <i-col span="11">
                                                    <Form-item prop="ywjj">
                                                        <Input :disabled="disabled" v-model="syfkValidate.ywjj"></Input>
                                                    </Form-item>
                                                </i-col>
                                            </Row>
                                            <Row>
                                                <i-col span="11">
                                                    <Form-item label="臀围:" prop="tw2" :label-width="40">
                                                        <Input :disabled="disabled" v-model="syfkValidate.tw2" style="margin-left: 23px;"></Input>
                                                    </Form-item>
                                                </i-col>
                                                <i-col span="2" style="text-align: center">→</i-col>
                                                <i-col span="11">
                                                    <Form-item prop="tw2jj">
                                                        <Input :disabled="disabled" v-model="syfkValidate.tw2jj"></Input>
                                                    </Form-item>
                                                </i-col>
                                            </Row>
                                            <Row>
                                                <i-col span="11">
                                                    <Form-item label="横档:" prop="hd" :label-width="40">
                                                        <Input :disabled="disabled" v-model="syfkValidate.hd" style="margin-left: 23px;"></Input>
                                                    </Form-item>
                                                </i-col>
                                                <i-col span="2" style="text-align: center">→</i-col>
                                                <i-col span="11">
                                                    <Form-item prop="hdjj">
                                                        <Input :disabled="disabled" v-model="syfkValidate.hdjj"></Input>
                                                    </Form-item>
                                                </i-col>
                                            </Row>
                                            <Row>
                                                <i-col span="11">
                                                    <Form-item label="腿围:" prop="tuiwei" :label-width="40">
                                                        <Input :disabled="disabled" v-model="syfkValidate.tuiwei" style="margin-left: 23px;"></Input>
                                                    </Form-item>
                                                </i-col>
                                                <i-col span="2" style="text-align: center">→</i-col>
                                                <i-col span="11">
                                                    <Form-item prop="tuiweijj">
                                                        <Input :disabled="disabled" v-model="syfkValidate.tuiweijj"></Input>
                                                    </Form-item>
                                                </i-col>
                                            </Row>
                                            <Row>
                                                <i-col span="11">
                                                    <Form-item label="裤长:" prop="kc" :label-width="40">
                                                        <Input :disabled="disabled" v-model="syfkValidate.kc" style="margin-left: 23px;"></Input>
                                                    </Form-item>
                                                </i-col>
                                                <i-col span="2" style="text-align: center">→</i-col>
                                                <i-col span="11">
                                                    <Form-item prop="kcjj">
                                                        <Input :disabled="disabled" v-model="syfkValidate.kcjj"></Input>
                                                    </Form-item>
                                                </i-col>
                                            </Row>
                                        </i-col>
                                        <i-col span="10">
                                            <img src="../../images/syfkxiku.png" style="width: 250px;">
                                        </i-col>
                                    </Row>
                                </div>
                                <h4>
                                    备注信息
                                </h4>
                                <div class="noteInfor">
                                    <Form-item  prop="tranmemo">
                                        <Input :disabled="disabled" type="textarea" :rows="1" v-model="syfkValidate.tranmemo"></Input>
                                    </Form-item>
                                </div>
                            </div>
                        </Form>
                        <div slot="footer">
                            <div v-if="addCus" class="footer" style="text-align: center; padding: 0px 0px 20px;" >
                                <Button  size="small" :loading="modal_loading" @click="addPicOrder('syfkValidate')">保存</Button>
                                <Button  size="small" @click="clearPicOrder('syfkValidate')">清空</Button>
                            </div>
                        </div>
                    </div>
                    <div slot="footer"></div>
                </Modal>
            </i-col>
        </Row>
        <!-- 头部结束-->
        <!-- 中间主体-->
        <div class="console-product-contcent" id="contcentHeight" :style="{height:height +'px'}">
            <!-- 搜索-->
            <Form class="searchform" ref="syfkForm" :model="syfkForm" inline >
                <Form-item label="订单号:" :label-width="50" style="width:190px;">
                    <Input v-model="syfkForm.orderno" placeholder="" @on-enter="syfkFormSearch"></Input>
                </Form-item>
                <Form-item label="日期:" :label-width="35" style="width:250px;">
                    <Date-picker type="daterange" v-model="syfkForm.createtime" :options="creatDate0ptions" placement="bottom-start" placeholder="选择日期" style="width: 215px"></Date-picker>
                </Form-item>
                <Form-item>
                    <Button class="search" @click="syfkFormSearch">搜索</Button>
                </Form-item>
            </Form>
            <!-- 搜索结束-->
            <!-- 表格-->
            <Loading v-if="spinShow"></Loading>
            <Table v-if="tableShow"  stripe border :columns="syfkColumns" :data="syfkData"></Table>
        </div>
        <Row style="background-color: #ffffff;margin-top: 1px;">
            <Col>
            <div v-if="tableShow" class="tablepage clearfix">
                <div class="fl">
                    <span>共</span>
                    <span class="num">{{total}}</span>
                    <span>条记录</span>
                    <span>{{currentPage}}/{{pageTotal}}页</span>
                </div>
                <div class="fr">
                    <Page :total="total" :page-size="pageSize" :current="currentPage" placement="top" show-elevator show-sizer @on-change="changePage" @on-page-size-change="changeSize"></Page>
                </div>
            </div>
            </Col>
        </Row>
    </div>
</template>
<script>
    import Loading from '../../components/loading';
    import ICol from "../../../node_modules/iview/src/components/grid/col";
    import InputNumber from "../../../node_modules/iview/src/components/input-number/input-number";
    export default {
        //所需子组件
        components: {InputNumber, ICol, Loading},
        data () {
            return {
                total:0,//总条数
                currentPage:1,//当前页
                pageTotal:1,//总页数
                pageSize:10,//默认每页显示数量
                height:1000,//表单高度
                spinShow: true,//加载层，默认显示
                tableShow: false,//表格层，默认隐藏
                modal_loading: false,
                addCus:false,
                editorCus:false,
                disabled:false,
                autoList:[],
                loadingOrderno:false,
                syfkForm:{//客户档案条件查询
                    orderno:"",    //订单号
                    createtime:[new Date().getTime() - 3600 * 1000 * 24 * 7,new Date()]
                },
                creatDate0ptions: {
                    shortcuts: [
                        {
                            text: '最近一周',
                            value () {
                                const end = new Date();
                                const start = new Date();
                                start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
                                return [start, end];
                            }
                        },
                        {
                            text: '最近一个月',
                            value () {
                                const end = new Date();
                                const start = new Date();
                                start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
                                return [start, end];
                            }
                        },
                        {
                            text: '最近三个月',
                            value () {
                                const end = new Date();
                                const start = new Date();
                                start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
                                return [start, end];
                            }
                        }
                    ]
                },
                //表单验证
                rulesyfk: {
                    unit: [
                        { required: true, message: '请输入店名/单位', trigger: 'blur' }
                    ],
                    orderno: [
                        { required: true, message: '请输入订单号', trigger: 'change' }
                    ],
                    name: [
                        { required: true, message: '请输入顾客姓名', trigger: 'blur' }
                    ],
                    massingname: [
                        { required: true, message: '请输入量体师姓名', trigger: 'blur' }
                    ],
                    phone: [
                        { required: true, message: '请输入电话号码', trigger: 'blur' }
                    ],
                },
                //客户档案数据格式
                syfkColumns:[
                    {
                        width:'6%',
                        title: '序号',
                        type: 'index'
                    },
                    {
                        width:'10%',
                        title: '改衣类型',
                        key: 'clothingtype',
                        render: (h, params) => {
                            var text = params.row.clothingtype == 1 ? '半成品试衣' : '成品试衣';
                            return h('Tooltip', {
                                props: {
                                    content: text,
                                    placement:"bottom-start"
                                }
                            }, [h('span', text)]);
                        }
                    },
                    {
                        width:'10%',
                        title: '业务类型',
                        key: 'business',
                        render: (h, params) => {
                            var text = params.row.business == 'mtm' ? '量体定制' : params.row.business == 'tz' ? '团装' :  '零售';
                            return h('Tooltip', {
                                props: {
                                    content: text,
                                    placement:"bottom-start"
                                }
                            }, [h('span', text)]);
                        }
                    },
                    {
                        width:'12%',
                        title: '店名/单位',
                        key: 'unit',
                        render: (h, params) => {
                            return h('Tooltip', {
                                props: {
                                    content: params.row.unit,
                                    placement:"bottom-start"
                                }
                            }, [h('span', params.row.unit)]);
                        }
                    },
                    {
                        width:'12%',
                        title: '订单号',
                        key: 'orderno',
                        render: (h, params) => {
                            return h('Tooltip', {
                                props: {
                                    content: params.row.orderno,
                                    placement:"bottom-start"
                                }
                            }, [h('span', params.row.orderno)]);
                        }
                    },
                    {
                        width:'10%',
                        title: '顾客姓名',
                        key: 'name',
                        render: (h, params) => {
                            return h('Tooltip', {
                                props: {
                                    content: params.row.name,
                                    placement:"bottom-start"
                                }
                            }, [h('span', params.row.name)]);
                        }
                    },
                    {
                        width:'10%',
                        title: '量体师',
                        key: 'massingname',
                        render: (h, params) => {
                            return h('Tooltip', {
                                props: {
                                    content: params.row.massingname,
                                    placement:"bottom-start"
                                }
                            }, [h('span', params.row.massingname)]);
                        }
                    },
                    {
                        width:'10%',
                        title: '联系电话',
                        key: 'phone',
                        render: (h, params) => {
                            return h('Tooltip', {
                                props: {
                                    content: params.row.phone,
                                    placement:"bottom-start"
                                }
                            }, [h('span', params.row.phone)]);
                        }
                    },
                    {
                        width:'10%',
                        title: '填表日期',
                        key: 'createtime',
                        render: (h, params) => {
                            var text = new Date(params.row.createtime).format("yyyy-MM-dd");
                            return h('Tooltip', {
                                props: {
                                    content: text,
                                    placement:"bottom-start"
                                }
                            }, [h('span', text)]);
                        }
                    },
                    {
                        width:'10%',
                        title: '操作',
                        key: 'id',
                        render: (h, params) => {
                            return h('div', [
                                h('Button',
                                    {
                                        class:"error blue",
                                        on: {
                                            click: () => {
                                            this.checkSyfk(params.row.id)
                                        }
                                    }
                                }, [
                                        h('i', {
                                            class : 'iconfont icon-chakan'
                                        }),
                                        h("span",'查看')
                                    ])
                            ]);
                        }
                    }
                ],
                //试衣反馈数据
                syfkData:[],
                syfkValidate: {
                    clothingtype:1,
                    business:'mtm',
                    unit:'',
                    phone:'',
                    orderno:'',
                    name:'',
                    massingname:'',
                    createtime:new Date().format("yyyy-MM-dd"),
                    yc:'',
                    ycjj:'',
                    jk:'',
                    jkjj:'',
                    xc:'',
                    xcjj:'',
                    xw:'',
                    xwjj:'',
                    fw:'',
                    fwjj:'',
                    tw:'',
                    twjj:'',
                    ld:'',
                    ldjj:'',
                    yw:'',
                    ywjj:'',
                    tw2:'',
                    twjj2:'',
                    hd:'',
                    hdjj:'',
                    tuiwei:'',
                    tuiweijj:'',
                    kc:'',
                    kcjj:'',
                    tranmemo:''
                },
                syfkModal: false
            }
        },
        created:function(){
            var width = window.innerWidth;
            if(width >1600){
                this.height=window.innerHeight-200;
            }else if(width > 1440 && width <=1600){
                this.height=window.innerHeight-180;
            }else if(width > 1366 && width <=1440){
                this.height=window.innerHeight-172;
            }else if(width > 1280 && width <=1366){
                this.height=window.innerHeight-166;
            }else if(width > 1024 && width <=1280){
                this.height=window.innerHeight-162;
            }else{
                this.height=window.innerHeight-151;
            }
            if(window.innerWidth > 1600){
                this.pageSize=20;
            }
            this.syfkData = this.syfkTableData(this.syfkForm,this.currentPage,this.pageSize);
        },
        mounted() {
            $(".center").scroll(function() {
                if(sessionStorage.getItem("centerScrollTop") == "YES"){
                    $('.center').animate({ scrollTop: 0 }, 1);
                    sessionStorage.setItem("centerScrollTop","NO");
                };
            });
        },
        methods: {
            //查询物流数据，条件，当前页，每页显示多少条
            syfkTableData (formData,currentPage,pageSize) {
                this.spinShow=true;
                this.tableShow = false;
                var orderno = formData.orderno;//订单号
                var fromDate = '';//开始时间
                var toDate = '';//结束时间
                if(formData.createtime.length != 0 && formData.createtime[0] != null && formData.createtime[1] != null){
                    var fromDateTime = (new Date(formData.createtime[0])).getTime();
                    fromDate = new Date(fromDateTime).format("yyyy-MM-dd");
                    var toDateTime = (new Date(formData.createtime[1])).getTime();
                    toDate = new Date(toDateTime).format("yyyy-MM-dd");
                }
                let data = {
                    params: {
                        pageIndex : currentPage,
                        pageSize : pageSize,
                        orderno : orderno,
                        fromDate : fromDate,
                        toDate : toDate
                    }
                };
                axios.get('/feedbacks ',data).then(res => {
                    this.total=res.data.total;
                    this.pageTotal=Math.ceil(res.data.total / pageSize);
                    this.syfkData = res.data.data;
                    this.spinShow=false;
                    this.tableShow = true;
                }).catch(err =>{
                })
            //条件查询
        },
            syfkFormSearch(){
                this.currentPage=1;
                this.syfkData = this.syfkTableData(this.syfkForm,this.currentPage,this.pageSize);
            },
            //改变页数
            changePage: function (page) {
                this.currentPage=page;
                this.syfkData = this.syfkTableData(this.syfkForm,this.currentPage,this.pageSize);
            },
            //改变每页显示多少条
            changeSize: function (pageSize) {
                this.currentPage=1;
                this.pageSize = pageSize;
                this.pageTotal=Math.ceil(this.total / this.pageSize);
                this.syfkData = this.syfkTableData(this.syfkForm,this.currentPage,this.pageSize);
            },
            //新增试衣反馈
            addSyfk() {
                this.disabled=false; //禁用输入框
                this.syfkModal=true; //弹出层

                this.addCus = true;
                this.editorCus=false;//编辑 Model头部名称
            },
            //查看试衣反馈
            checkSyfk(column) {
                this.addCus = false;
                this.disabled=true;
                this.editorCus=true;
                this.syfkModal=true;
                $(".center").scroll();
                axios.get('/feedbacks/'+column).then(res => {
                    this.syfkValidate = res.data;
                    this.syfkValidate.createtime=new Date(res.data.createtime).format("yyyy-MM-dd");
                }).catch(err =>{
                })
            },
            //保存
            addPicOrder (name) {
                this.modal_loading = true;
                this.$refs[name].validate((valid) => {
                    if(valid){
                        axios.post('/feedbacks', this.syfkValidate).then(res => {
                            this.modal_loading = false;
                            this.syfkModal = false;
                            this.addCus = false;//新增title和保存
                            this.$Message.success('添加成功');
                            this.$refs[name].resetFields();
                            this.syfkData = this.syfkTableData(this.syfkForm,this.currentPage,this.pageSize);
                        }).catch(err =>{
                        });
                    }else{
                        this.modal_loading = false;
                    }
                });
            },
            clearPicOrder (name) {
                this.$refs[name].resetFields();
                sessionStorage.setItem("centerScrollTop","YES");
            },
            //自动补全订单号
            remoteOrderno(query){
                if (query !== '') {
                    this.loadingOrderno = true;
                    axios.get('/feedbacks/'+query+'/auto').then(res => {
                        this.loadingOrderno = false;
                        this.autoList  = res.data;
                    }).catch(err =>{
                    })
                } else {
                    this.autoList  = [];
                }
            },
            changeOrder(selection) {
                for(var i in this.autoList){
                    if(this.autoList[i].khdh ==  selection){
                        this.syfkValidate.name = this.autoList[i].auditby;
                        this.syfkValidate.phone = this.autoList[i].telphone;
                        this.syfkValidate.massingname = this.autoList[i].ltry;
                    }
                }
            }
        }
    }
</script>